package com.dsz.du.mealbooking.contoller;


import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.dsz.du.mealbooking.commands.LoginCommand;
import com.dsz.du.mealbooking.commands.RegisterCommand;


/**
 * 简单转换
 * @author du
 *
 */
@Controller
public class Do2JSPController {

	public Do2JSPController() {}
	
	private static Logger logger = Logger.getLogger(Do2JSPController.class);
	

	@RequestMapping("/indexJSP.do")
	protected String index(ModelMap model, @ModelAttribute("user") LoginCommand user) throws Exception {
		
		if (logger.isDebugEnabled()) {
			logger.debug("path is : indexJSP.do");

		}
		return "login";	
	}
	
	@RequestMapping("/register.do")
	protected String register(@ModelAttribute("user") RegisterCommand user){
		return "registerUser";	
	}
	
}
